package com.yfqy.app.modules.system.dto;

import jakarta.validation.constraints.NotBlank;
import jakarta.validation.constraints.NotNull;
import lombok.Data;
import org.hibernate.validator.constraints.Range;

@Data
public class SystemConfigDTO {

    private Long id;

    @NotBlank(message = "配置分组不能为空")
    private String configGroup;

    @NotBlank(message = "配置KEY不能为空")
    private String configKey;

    private String configValue;

    @NotBlank(message = "配置描述不能为空")
    private String configDesc;

    // 1-启用，0-禁用
    @Range(min = 0, max = 1, message = "状态不正确")
    private Integer status;

    // 用于前端展示的配置值configValue对象
    @NotNull(message = "配置对象不能为空")
    private Object configValueObj;
}
